home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / Vyzkuste / xsetup / _SETUP.2 / Group3 / XQ WinNT CrashControl 2.xpl < prev    next >
Text File  |  1999-09-08  |  1KB  |  47 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="6"
  3. "COUNT"="1"
  4. "UIPATH"="System\Misc"
  5. "NAME"="Crash Control #2"
  6. "VERSION"="1.00"
  7. "WARNING"="1"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Automatically Reboot after crash (Blue Screen)"
  10. "DESCRIPTION 1"="This option requires at least a two MB swapfile on your system drive (environment variable "%SystemDrive%"). 
  11. "DESCRIPTION 2"="Otherwise, enabling this option may prevent the system from running properly if the swap file has been moved to another drive. 
  12. "DESCRIPTION 3"="More options can be configured using "Control Panel" -> "System" -> "Startup/Shutdown"."
  13. "AUTHOR"="Xteq Systems"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"="For more information, go to http://www.xteq.com"
  16. "COMMENT 2"="Thanks to Pierre Szwarc for the "this might crash" tip!"
  17.  
  18.  
  19. sPath="HKLM\System\CurrentControlSet\Control\CrashControl\"
  20. sAR="AutoReboot"
  21.  
  22. Sub Plugin_Initialize 
  23.  if RegPathExists(sPath)=false then
  24.     Call Disable
  25.  else
  26.     i=RegReadValue(sPath & sAR)
  27.     if i=1 then Call SetUIElement(1,True)
  28.  end if
  29. End Sub
  30.  
  31. Sub Plugin_CheckData(ElementIndex)
  32. End Sub
  33.  
  34. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  35.  b=GetUIElement(1)
  36.  if b=true then
  37.     Call RegWriteValue(sPath & sAR,1,2)
  38.  else
  39.     Call RegWriteValue(sPath & sAR,0,2)
  40.  end if
  41.  
  42.  Call Restart
  43. End Sub
  44.  
  45. Sub Plugin_Terminate 
  46. End Sub
  47.